package com.zilla.android.zillacore.libzilla.util;

import com.zilla.android.zillacore.libzilla.file.SharedPreferenceService;

/**
 * @author lori.lin
 * @date 2014/9/24 14:03.
 * Body信息管理
 */
public class BodyManager {
    private static BodyManager bodyManager = null;

    private BodyManager() {

    }

    public static BodyManager getInstance() {
        if (bodyManager == null) {
            bodyManager = new BodyManager();
        }
        return bodyManager;
    }

    public void saveBodyNickName(String nickName)
    {
        SharedPreferenceService.getInstance().put("bodyNickName",nickName);}
    public String getBodyNickName()
    {
        return SharedPreferenceService.getInstance().get("bodyNickName","");
    }
    public void saveBodyUserId(int userId)
    {
        SharedPreferenceService.getInstance().put("bodyUserId",userId);}
    public int getBodyUserId()
    {
        return SharedPreferenceService.getInstance().get("bodyUserId",-1);
    }
    public void saveExpressBodyUserId(int userId)
    {
        SharedPreferenceService.getInstance().put("expressBodyUserId",userId);}
    public int getExpressBodyUserId()
    {
        return SharedPreferenceService.getInstance().get("expressBodyUserId",0);
    }
    public void saveBodyCityId(int cityId)
    {
        SharedPreferenceService.getInstance().put("bodyCityId",cityId);}
    public int getBodyCityId()
    {
        return SharedPreferenceService.getInstance().get("bodyCityId",0);
    }
    public void saveBodyOS(int os)
    {
        SharedPreferenceService.getInstance().put("bodyOs",os);}
    public int getBodyOS()
    {
        return SharedPreferenceService.getInstance().get("bodyOs",0);
    }
    public void saveBodyName(String name)
    {
        SharedPreferenceService.getInstance().put("name",name);}
    public String getBodyName()
    {
        return SharedPreferenceService.getInstance().get("name","");
    }
    public void saveBodyAmount(String amount)
    {
        SharedPreferenceService.getInstance().put("amount",amount);}
    public String getBodyAmount()
    {
        return SharedPreferenceService.getInstance().get("amount","");
    }
}
